<template>
  <div>
    <el-button size="mini" type="primary" icon="el-icon-setting" @click="to" />
    <eForm ref="form" :sup-this="supThis" />
  </div>
</template>
<script>
import eForm from './pwdform'
export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    // index.vue 的this 可用于刷新数据
    supThis: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = { id: this.data.id, username: this.data.username, name: this.data.name, phone: this.data.phone,
        email: this.data.email, enabled: this.data.enabled.toString() }
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{display: inline-block;margin-right: 3px;}
</style>
